<template>
      <div class="formBox">
        <el-form
          ref="orderForm"
          label-position="left"
          :model="formData"
          label-width="110px"
        >
          <div class="cTitle">
            <h3>订单信息</h3>
          </div>
          <div class="formItem">
            <el-form-item label="订单单号">
              {{ formData.checkBillData.xieYiShuHao }}
            </el-form-item>
            <el-form-item label="产品名称">
              {{ formData.checkBillData.productName }}
            </el-form-item>
            <el-form-item label="客户单号">
              {{ formData.orderBaseData.customerBillNo }}
            </el-form-item>
            <el-form-item label="合同号">
              {{ formData.orderBaseData.contractCode }}
            </el-form-item>
            <el-form-item label="印刷版本">
              {{ formData.checkBillData.productVersions }}
            </el-form-item>
            <el-form-item label="印刷板面">
              {{ formData.checkBillData.printingSurface }}
            </el-form-item>
            <el-form-item label="标签套数">
              {{ formData.orderBaseData.taoZhuangQuantity }}
            </el-form-item>
            <el-form-item label="标签枚数">
              {{ formData.orderBaseData.tagSumQuantity }}
            </el-form-item>
          </div>

          <div class="cTitle">
            <h3>订单信息</h3>
          </div>
          <div class="formItem">
            <el-form-item label="标签套数">
              {{ formData.orderBaseData.taoZhuangQuantity }}
            </el-form-item>
            <el-form-item label="标签枚数">
              {{ formData.orderBaseData.tagSumQuantity }}
            </el-form-item>
            <el-form-item label="业务员">
              {{ formData.orderBaseData.salesmanName }}
            </el-form-item>
            <el-form-item label="联系电话">
              {{ formData.orderBaseData.salesmanMobile }}
            </el-form-item>
          </div>

          <div class="cTitle">
            <h3>数据信息</h3>
          </div>
          <div class="formItem">
            <el-form-item label="数据来源">
              {{ formData.orderBaseData.dataComeFromName }}
            </el-form-item>
            <el-form-item label="数据数量">
              {{ formData.orderBaseData.tagDataQuantity }}
            </el-form-item>
            <el-form-item label="数据状态">
              {{ formData.orderBaseData.dataProduceState }}
            </el-form-item>
          </div>

          <div class="cTitle mt5">
            <h3>标签关系</h3>
          </div>
          <div class="formItem">
            <labelTree :tree-data="formData.packageRelations" />
          </div>
          <div class="cTitle mt10">
            <h3>产品包装</h3>
          </div>
          <!-- <div class="formItem">
            <el-form-item label="成品样式">
              {{ formData.packageData.productStyleName }}
            </el-form-item>

            <el-form-item
              v-if="formData.packageData.productStyle !== 1"
              label="出标方向"
            >
              {{ formData.packageData.outDirectionName }}
            </el-form-item>

            <el-form-item
              v-if="formData.packageData.productStyle === 2"
              label="卷向"
            >
              {{ formData.packageData.scrollDirectionName }}
            </el-form-item>

            <el-form-item label="贴标方式">
              {{ formData.packageData.tagAffixWayName }}
            </el-form-item>

            <el-form-item
              v-if="formData.packageData.productStyle === 2"
              label="卷芯大小"
            >
              {{ formData.packageData.mandrelSize }}
            </el-form-item>
            <el-form-item
              v-if="formData.packageData.productStyle === 2"
              label="外直径不超过"
            >
              {{ formData.packageData.notOverDiameter }}
            </el-form-item>

            <el-form-item
              v-if="formData.packageData.productStyle === 2"
              label="每卷等于"
            >
              {{ formData.packageData.pageEqualTags }}
              {{ formData.orderBaseData.productUnion || "枚" }}
            </el-form-item>

            <el-form-item
              v-if="formData.packageData.productStyle !== 2"
              label="每张等于"
            >
              {{ formData.packageData.pageEqualTags }}
              {{ formData.orderBaseData.productUnion || "枚" }}
            </el-form-item>
            <el-form-item
              v-if="formData.packageData.productStyle !== 2"
              label="每包等于"
            >
              {{ formData.packageData.packageEqualPages }}
              <template>张</template>
            </el-form-item>
            <el-form-item label="每箱等于">
              {{ formData.packageData.boxEqualPackages }}
              <template>{{
                formData.packageData.productStyle !== 2 ? "包" : "卷"
              }}</template>
            </el-form-item>
            <el-form-item label="每箱共计">
              {{ formData.packageData.boxEqualTags }}
              <template>{{
                formData.orderBaseData.productUnion || "枚"
              }}</template>
            </el-form-item>
          </div> -->
          <div class="formItem">
              <el-form-item label="成品样式">
                <el-select
                  v-model="formData.packageData.productStyle"
                  placeholder="请选择成品样式"
                  clearable
                  size="mini"
                  disabled
                >
                  <el-option label="卷式" :value="2" />
                  <el-option label="平张" :value="1" />
                  <el-option label="折页" :value="3" />
                </el-select>
              </el-form-item>

              <el-form-item
                v-if="formData.packageData.productStyle !== 1"
                label="出标方向"
              >
                <el-select
                  v-model="formData.packageData.outDirection"
                  placeholder="请选择成品样式"
                  size="mini"
                  disabled
                >
                  <el-option label="上" :value="1" />
                  <el-option label="下" :value="2" />
                  <el-option label="左" :value="3" />
                  <el-option label="右" :value="4" />
                </el-select>
              </el-form-item>

              <el-form-item
                v-if="formData.packageData.productStyle === 2"
                label="卷向"
              >
                <el-select
                  v-model="formData.packageData.scrollDirection"
                  placeholder="请选择成品样式"
                  size="mini"
                  disabled
                >
                  <el-option label="页面朝内" :value="1" />
                  <el-option label="页面朝外" :value="2" />
                </el-select>
              </el-form-item>

              <el-form-item label="贴标方式">
                <el-select
                  v-model="formData.packageData.tagAffixWay"
                  placeholder="请选择成品样式"
                  clearable
                  size="mini"
                  disabled
                >
                  <el-option
                    label="自动帖"
                    :value="1"
                    :disabled="formData.packageData.productStyle === 1"
                  />
                  <el-option label="手帖" :value="2" />
                </el-select>
              </el-form-item>

              <el-form-item
                v-if="formData.packageData.productStyle === 2"
                label="卷芯大小"
              >
                <el-input
                  v-model="formData.packageData.mandrelSize"
                  v-toFixed="3"
                  placeholder="请输入内容"
                  size="mini"
                  disabled
                >
                  <template slot="append">mm</template>
                </el-input>
              </el-form-item>
              <el-form-item
                v-if="formData.packageData.productStyle === 2"
                label="外直径不超过"
              >
                <el-input
                  v-model="formData.packageData.notOverDiameter"
                  v-toFixed="3"
                  placeholder="请输入内容"
                  size="mini"
                  disabled
                >
                  <template slot="append">mm</template>
                </el-input>
              </el-form-item>

              <el-form-item
                v-if="formData.packageData.productStyle === 2"
                label="每卷等于"
              >
                <el-input
                  v-model="formData.packageData.pageEqualTags"
                  v-toFixed="3"
                  placeholder="请输入内容"
                  size="mini"
                  :disabled="isDisable"
                  @blur="getBoxEqualTags"
                >
                  <template slot="append">{{
                    formData.orderBaseData.productUnion || "枚"
                  }}</template>
                </el-input>
              </el-form-item>

              <el-form-item
                v-if="formData.packageData.productStyle !== 2"
                label="每张等于"
              >
                <el-input
                  v-model="formData.packageData.pageEqualTags"
                  v-toFixed="3"
                  placeholder="请输入内容"
                  size="mini"
                  :disabled="isDisable"
                  @blur="getBoxEqualTags"
                >
                  <template slot="append">{{
                    formData.orderBaseData.productUnion || "枚"
                  }}</template>
                </el-input>
              </el-form-item>
              <el-form-item
                v-if="formData.packageData.productStyle !== 2"
                label="每包等于"
              >
                <el-input
                  v-model="formData.packageData.packageEqualPages"
                  v-toFixed="3"
                  placeholder="请输入内容"
                  size="mini"
                  :disabled="isDisable"
                  @blur="getBoxEqualTags"
                >
                  <template slot="append">张</template>
                </el-input>
              </el-form-item>
              <el-form-item label="每箱等于">
                <el-input
                  v-model="formData.packageData.boxEqualPackages"
                  v-toFixed="3"
                  placeholder="请输入内容"
                  size="mini"
                  :disabled="isDisable"
                  @blur="getBoxEqualTags"
                >
                  <template slot="append">{{
                    formData.packageData.productStyle !== 2 ? "包" : "卷"
                  }}</template>
                </el-input>
              </el-form-item>
              <el-form-item label="每箱共计">
                <el-input
                  v-model="formData.packageData.boxEqualTags"
                  v-toFixed="3"
                  placeholder="请输入内容"
                  size="mini"
                  :disabled="isDisable"
                >
                  <template slot="append">{{
                    formData.orderBaseData.productUnion || "枚"
                  }}</template>
                </el-input>
              </el-form-item>
            </div>
          <div class="cTitle mt10">
            <h3>订单备注</h3>
          </div>
          <div>{{ formData.orderBaseData.orderRemark }}</div>
        </el-form>
      </div>
</template>

<script>
import labelTree from "@/components/labelTree";
export default {
  name: "sideOrder",
  props: {
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  components: { labelTree },
  data() {
    return {
      isDisable:false //是否禁用
    };
  },
};
</script>

<style lang="scss" scoped>
      .formBox {
        padding: 0 16px;
        .order {
          padding: 10px 0;
        }
      }
</style>
